import { useApiPagination } from '@wowon/hooks';
import { definePlugin } from '@/components/@comp/create-component';

export default definePlugin({
  name: 'request',
  priority: 'TOOL',
  extendProps: {
    request: Object,
  },
  useMain(_instance, props) {
    // console.log(props);
    const { request: requestConfig } = props;

    const request = useApiPagination(requestConfig.query, requestConfig);

    return { request };
  },
});
